<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../../templates/applicationTemplate.xhtml"
                xmlns:rich="http://richfaces.org/rich"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:a4j="http://richfaces.org/a4j"
                xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:define name="title">
        SGA - #{teamManagedBean.editorPanelTitle}
    </ui:define>

    <ui:define name="content">
        <h:form> 
            <rich:panel id="teamEditor"
                        style="overflow: hidden;" >

                <f:facet name="header" >
                    <h:outputText styleClass="mainPanel" value="#{teamManagedBean.editorPanelTitle}" />
                </f:facet>

                <rich:panel header="#{bundle.teamEditorTeamEntityTitle}" 
                            style="width: 360px;" >
                    <ui:include src="./form.xhtml" >
                        <ui:param name="team" value="#{teamManagedBean.currentlyManagedTeam}" />
                    </ui:include>
                </rich:panel>

                <div style="float: right; margin: 5px;" >
                    <a4j:commandButton styleClass="editorActionButton"
                                       value="#{teamManagedBean.editorButtonLabel}"
                                       action="#{teamManagedBean.handleAction}" />
                    <a4j:commandButton styleClass="editorCancelButton" 
                                       value="#{bundle.cancelButton}"
                                       action="#{teamManagedBean.processActionAndRedirect('VIEW')}"
                                       immediate="true" />
                </div>

            </rich:panel>
        </h:form>
    </ui:define>

</ui:composition>
